cmake_minimum_required(VERSION 3.0.2)
project(mqtt_bridge)

find_package(catkin REQUIRED COMPONENTS message_generation std_msgs)

catkin_python_setup()

add_message_files(
  FILES
  cmd.msg
  endTask.msg
  recordPath.msg
  recordPoint.msg
  porterCmd.msg
  recordMap.msg
  initialPose.msg
  voiceBroadcast.msg
  navigationTask.msg
  voiceTask.msg
  followCmd.msg
)

generate_messages(
  DEPENDENCIES
  # std_msgs
)

include_directories(
# include
  ${catkin_INCLUDE_DIRS}
)

catkin_package()



install(PROGRAMS
  scripts/mqtt_bridge_node.py
  DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

file(GLOB SCRIPTS scripts/*.py)
foreach(script ${SCRIPTS})
  set_property(GLOBAL PROPERTY SCRIPT_PERMISSION "${CMAKE_CURRENT_SOURCE_DIR}/${script}")
  execute_process(COMMAND chmod +x ${script})
endforeach()

install(DIRECTORY launch
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)

install(DIRECTORY config
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
